

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
    <style>
    /* base */
    html,
    body,
    .container {
      width: 100%;
      height: 100%;
    }

    a,
    a:link,
    a:visited {
      text-decoration: none;
      color: inherit;
    }

    ul {
      list-style: none;
    }

    *,
    ::before,
    ::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    *:focus {
      outline: 0;
    }

    .container {
      display: flex;
      padding-top: 20px;
    }

    /* Nav */
    .container .doc-nav {
      position: fixed;
      height: 100%;
      margin: 0 30px 0 40px;
      width: 280px;
    }

    .doc-nav .nav-header {
      display: flex;
      align-items: center;
      box-sizing: border-box;
      background-color: rgb(240, 241, 242);
      height: 40px;
      padding: 16px;
      font-size: 18px;
      font-weight: 500;
      color: rgb(62, 64, 66);
      cursor: pointer;
    }

    .doc-nav .nav-content {
      height: calc(100% - 40px);
      overflow-y: auto;
      color: rgb(32, 34, 36);
    }

    .doc-nav .nav-content .nav-list,
    .doc-nav .nav-content .nav-sub-list {
      line-height: 1.5rem;
    }

    .doc-nav .nav-content .nav-label {
      display: inline-block;
      position: relative;
      padding: 2px 0 2px 20px;
      margin-bottom: 4px;
    }

    .doc-nav .nav-content .nav-sub-label {
      position: relative;
      padding: 2px 0 2px 40px;
      font-size: 14px;
    }

    .doc-nav .nav-content .nav-sub-label:hover {
      text-decoration: underline;
    }

    .doc-nav .nav-content .nav-list .nav-label.group::before {
      border-bottom: 0.25rem solid transparent;
      border-left: 0.25rem solid #6e7072;
      border-right: 0;
      border-top: 0.25rem solid transparent;
      content: '';
      display: block;
      height: 0;
      left: 0.5rem;
      position: absolute;
      top: 0.625rem;
      transition: transform 0.1s linear;
      width: 0;
    }

    .doc-nav .nav-content .nav-list .nav-label.group.active::before {
      transform: rotate(90deg);
    }

    /* doc content */
    .container .doc-content {
      position: fixed;
      height: 100%;
      width: calc(100% - 80px - 40px - 30px - 240px);
      right: 0%;
      overflow-y: auto;
    }

    .doc-title {
      border-bottom: 1px solid #dcdee0;
      font-size: 22px;
      margin: 8px 0 0;
      padding-bottom: 16px;
    }

    .doc-content h3 {
      font-size: 24px;
      font-weight: 600;
      margin: 24px 0;
    }

    .doc-content h4 {
      font-size: 22px;
      font-weight: 500;
      margin: 30px 0 8px;
    }

    .doc-content h4 span {
      color: #007d9c;
    }

    .doc-content .doc-declare {
      background-color: #fafafa;
      border-radius: 5px;
      border: 1px solid #ccc;
      font-size: 14px;
      overflow-x: auto;
      padding: 10px;
      tab-size: 4;
      line-height: 20px;
    }

    .doc-content .doc-comment {
      font-size: 16px;
      margin: 16px 0;
      line-height: 24px;
      word-break: break-word;
    }
  </style>

</head>
<body>
  <div class="container">
    <div class="doc-nav">
      <a href="#Documentation" class="nav-header">Documentation</a>
      <nav class="nav-content">
        <ul class="nav-list">
          <li>
            <a href="#includes" class="nav-label">Includes</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#tuya_cloud_types.h" class="nav-sub-label">tuya_cloud_types.h</a>
              </li>
      

              <li>
                <a href="#tuya_cloud_com_defs.h" class="nav-sub-label">tuya_cloud_com_defs.h</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#macros" class="nav-label">Macros</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#__TUYA_IOT_API_PRE_HANDLE_H" class="nav-sub-label">__TUYA_IOT_API_PRE_HANDLE_H</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#functions" class="nav-label">Functions</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#tuya_iot_api_pre_handle_register_cb" class="nav-sub-label">tuya_iot_api_pre_handle_register_cb</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#vars" class="nav-label">Vars</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#TUYA_IOT_API_PRE_HANDLE_CBS_S" class="nav-sub-label">TUYA_IOT_API_PRE_HANDLE_CBS_S</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#consts" class="nav-label">Consts</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#types" class="nav-label">Types</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#typedefs" class="nav-label">Typedefs</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#tuya_iot_upgrade_gw_notify_cb" class="nav-sub-label">tuya_iot_upgrade_gw_notify_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_refuse_upgrade_cb" class="nav-sub-label">tuya_iot_refuse_upgrade_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_reset_upgrade_detect_timer_cb" class="nav-sub-label">tuya_iot_reset_upgrade_detect_timer_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_gw_version_update_cb" class="nav-sub-label">tuya_iot_gw_version_update_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_dev_upgd_progress_rept_cb" class="nav-sub-label">tuya_iot_dev_upgd_progress_rept_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_dev_upgd_result_report_cb" class="nav-sub-label">tuya_iot_dev_upgd_result_report_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_get_wakeup_data_cb" class="nav-sub-label">tuya_iot_get_wakeup_data_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_get_heartbeat_data_cb" class="nav-sub-label">tuya_iot_get_heartbeat_data_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_get_heartbeat_interval_cb" class="nav-sub-label">tuya_iot_get_heartbeat_interval_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_book_wakeup_topic_cb" class="nav-sub-label">tuya_iot_book_wakeup_topic_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_book_additional_topic_cb" class="nav-sub-label">tuya_iot_book_additional_topic_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_get_mqtt_socket_fd_cb" class="nav-sub-label">tuya_iot_get_mqtt_socket_fd_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_send_custom_mqtt_msg_cb" class="nav-sub-label">tuya_iot_send_custom_mqtt_msg_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_send_mqtt_msg_with_topic_cb" class="nav-sub-label">tuya_iot_send_mqtt_msg_with_topic_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_upload_incre_data_cb" class="nav-sub-label">tuya_iot_upload_incre_data_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_media_data_report_cb" class="nav-sub-label">tuya_iot_media_data_report_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_media_data_report_v2_cb" class="nav-sub-label">tuya_iot_media_data_report_v2_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_get_custom_cfg_cb" class="nav-sub-label">tuya_iot_get_custom_cfg_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_get_location_info_cb" class="nav-sub-label">tuya_iot_get_location_info_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_custom_data_report_sync_cb" class="nav-sub-label">tuya_iot_custom_data_report_sync_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_custom_data_report_async_cb" class="nav-sub-label">tuya_iot_custom_data_report_async_cb</a>
              </li>
      

              <li>
                <a href="#tuya_iot_dp_low_power_query_cb" class="nav-sub-label">tuya_iot_dp_low_power_query_cb</a>
              </li>
      

              <li>
                <a href="#TUYA_IOT_API_PRE_HANDLE_CBS_S;
" class="nav-sub-label">TUYA_IOT_API_PRE_HANDLE_CBS_S;
</a>
              </li>
      
            </ul>
            
          </li>
        </ul>
      </nav>
    </div>
    <div class="doc-content">
      <h2 id="Documentation" class="doc-title">Documentation</h2>
      <h3 id="includes">Includes</h3>
      

      <h4 id="tuya_cloud_types.h"><span>tuya_cloud_types.h</span></h4>
      <pre class="doc-declare"><code>#include "tuya_cloud_types.h"
</code></pre>
      <pre class="doc-comment">#include "tuya_cloud_types.h"
</pre>

      <h4 id="tuya_cloud_com_defs.h"><span>tuya_cloud_com_defs.h</span></h4>
      <pre class="doc-declare"><code>#include "tuya_cloud_com_defs.h"
</code></pre>
      <pre class="doc-comment">#include "tuya_cloud_com_defs.h"
</pre>
      <h3 id="macros">Macros</h3>
      

      <h4 id="__TUYA_IOT_API_PRE_HANDLE_H">Marco <span>__TUYA_IOT_API_PRE_HANDLE_H</span></h4>
      <pre class="doc-declare"><code>#define __TUYA_IOT_API_PRE_HANDLE_H
</code></pre>
      <pre class="doc-comment"></pre>
      <h3 id="functions">Functions</h3>
      

      <h4 id="tuya_iot_api_pre_handle_register_cb">Func <span>tuya_iot_api_pre_handle_register_cb</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET tuya_iot_api_pre_handle_register_cb(IN TUYA_IOT_API_PRE_HANDLE_CBS_S *cbs);</code></pre>
      <pre class="doc-comment">/**
 * @brief tuya_iot_api_pre_handle_register_cb 
 *
 * @param[in] cbs
 *
 * @return OPERATE_RET
 */</pre>
      <h3 id="vars">Vars</h3>
      

      <h4 id="TUYA_IOT_API_PRE_HANDLE_CBS_S">Variable <span>TUYA_IOT_API_PRE_HANDLE_CBS_S</span></h4>
      <pre class="doc-declare"><code>TUYA_IOT_API_PRE_HANDLE_CBS_S *tuya_iot_api_pre_handle_cb_get();</code></pre>
      <pre class="doc-comment">/**
 * @brief tuya_iot_api_pre_handle_cb_get 
 *
 * @return handler of callbacks
 */</pre>
      <h3 id="consts">Consts</h3>
      
      <h3 id="types">Types</h3>
      
      <h3 id="typedefs">Typedefs</h3>
      

      <h4 id="tuya_iot_upgrade_gw_notify_cb">Typedef <span>tuya_iot_upgrade_gw_notify_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_upgrade_gw_notify_cb)(IN CONST FW_UG_S *fw,
                                      IN CONST GET_FILE_DATA_CB get_file_cb,\
                                      IN CONST UPGRADE_NOTIFY_CB upgrd_nofity_cb,\
                                      IN CONST PVOID_T pri_data,\
                                      BOOL_T notify, UINT_T download_buf_size, OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_refuse_upgrade_cb">Typedef <span>tuya_iot_refuse_upgrade_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_refuse_upgrade_cb)(IN CONST FW_UG_S *fw, IN CONST CHAR_T *dev_id, OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_reset_upgrade_detect_timer_cb">Typedef <span>tuya_iot_reset_upgrade_detect_timer_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_reset_upgrade_detect_timer_cb)(IN CONST INT_T time_ms, OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_gw_version_update_cb">Typedef <span>tuya_iot_gw_version_update_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_gw_version_update_cb)(IN GW_PERMIT_DEV_TP_T type, IN CONST CHAR_T *ver, OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_dev_upgd_progress_rept_cb">Typedef <span>tuya_iot_dev_upgd_progress_rept_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_dev_upgd_progress_rept_cb)(IN CONST UINT_T percent, IN CONST CHAR_T *devid, IN CONST DEV_TYPE_T tp, OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_dev_upgd_result_report_cb">Typedef <span>tuya_iot_dev_upgd_result_report_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_dev_upgd_result_report_cb)(IN CONST CHAR_T *dev_id, IN CONST DEV_TYPE_T type, IN CONST INT_T result, OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_get_wakeup_data_cb">Typedef <span>tuya_iot_get_wakeup_data_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_get_wakeup_data_cb)(INOUT BYTE_T *wakeup_data_arr, INOUT UINT_T *p_len, OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_get_heartbeat_data_cb">Typedef <span>tuya_iot_get_heartbeat_data_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_get_heartbeat_data_cb)(INOUT BYTE_T *heartbeat_data_arr, INOUT UINT_T *p_len, OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_get_heartbeat_interval_cb">Typedef <span>tuya_iot_get_heartbeat_interval_cb</span></h4>
      <pre class="doc-declare"><code>typedef INT_T (*tuya_iot_get_heartbeat_interval_cb)(OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_book_wakeup_topic_cb">Typedef <span>tuya_iot_book_wakeup_topic_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_book_wakeup_topic_cb)(OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_book_additional_topic_cb">Typedef <span>tuya_iot_book_additional_topic_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_book_additional_topic_cb)(IN CHAR_T *topic, OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_get_mqtt_socket_fd_cb">Typedef <span>tuya_iot_get_mqtt_socket_fd_cb</span></h4>
      <pre class="doc-declare"><code>typedef INT_T (*tuya_iot_get_mqtt_socket_fd_cb)(OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_send_custom_mqtt_msg_cb">Typedef <span>tuya_iot_send_custom_mqtt_msg_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_send_custom_mqtt_msg_cb)(IN CONST UINT_T protocol, IN CONST BYTE_T *p_data, OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_send_mqtt_msg_with_topic_cb">Typedef <span>tuya_iot_send_mqtt_msg_with_topic_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_send_mqtt_msg_with_topic_cb)(IN CONST CHAR_T *topic, IN CONST UINT_T protocol, IN CONST BYTE_T *p_data, OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_upload_incre_data_cb">Typedef <span>tuya_iot_upload_incre_data_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_upload_incre_data_cb)(IN CONST USHORT_T map_id, CONST UINT_T offset,IN CONST BYTE_T *pbuffer, IN CONST USHORT_T buf_len, OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_media_data_report_cb">Typedef <span>tuya_iot_media_data_report_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_media_data_report_cb)(IN CONST FLOW_BODY_ST *dt_body,IN CONST UINT_T timeout, OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_media_data_report_v2_cb">Typedef <span>tuya_iot_media_data_report_v2_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_media_data_report_v2_cb)(IN CONST FLOW_BODY_V2_ST *dt_body,IN CONST UINT_T timeout, OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_get_custom_cfg_cb">Typedef <span>tuya_iot_get_custom_cfg_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_get_custom_cfg_cb)(IN CONST TY_CUSTOM_CFG_E type, OUT CHAR_T **pp_cfg_str, OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_get_location_info_cb">Typedef <span>tuya_iot_get_location_info_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_get_location_info_cb)(INOUT TY_LOCATION_INFO_S *p_location, OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_custom_data_report_sync_cb">Typedef <span>tuya_iot_custom_data_report_sync_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_custom_data_report_sync_cb)(IN CONST BYTE_T *data, IN CONST INT_T len, IN CONST CHAR_T *topic,
                                                       IN CONST BYTE_T qos, IN CONST UINT_T timeout, OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_custom_data_report_async_cb">Typedef <span>tuya_iot_custom_data_report_async_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_custom_data_report_async_cb)(IN CONST BYTE_T *data, IN CONST INT_T len, IN CONST CHAR_T *topic,
                                                           IN CONST BYTE_T qos, IN CONST UINT_T timeout, OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="tuya_iot_dp_low_power_query_cb">Typedef <span>tuya_iot_dp_low_power_query_cb</span></h4>
      <pre class="doc-declare"><code>typedef OPERATE_RET (*tuya_iot_dp_low_power_query_cb)(IN CONST UCHAR_T *dps, IN CONST UINT_T cnt,
                                   OUT TY_RECV_OBJ_DP_S **obj_dps, OUT TY_RECV_RAW_DP_S **raw_dps, OUT BOOL_T *b_finish);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="TUYA_IOT_API_PRE_HANDLE_CBS_S;
">Typedef <span>TUYA_IOT_API_PRE_HANDLE_CBS_S;
</span></h4>
      <pre class="doc-declare"><code>typedef struct {
   tuya_iot_upgrade_gw_notify_cb	upgrade_gw_notify_cb ;
   tuya_iot_refuse_upgrade_cb refuse_upgrade_cb;
   tuya_iot_reset_upgrade_detect_timer_cb reset_upgrade_detect_timer_cb;
   tuya_iot_gw_version_update_cb gw_version_update_cb;
   tuya_iot_dev_upgd_progress_rept_cb dev_upgd_progress_rept_cb;
   tuya_iot_dev_upgd_result_report_cb dev_upgd_result_report_cb;
   tuya_iot_get_wakeup_data_cb get_wakeup_data_cb;
   tuya_iot_get_heartbeat_data_cb get_heartbeat_data_cb;
   tuya_iot_get_heartbeat_interval_cb get_heartbeat_interval_cb;
   tuya_iot_book_wakeup_topic_cb book_wakeup_topic_cb;
   tuya_iot_book_additional_topic_cb book_additional_topic_cb;
   tuya_iot_get_mqtt_socket_fd_cb get_mqtt_socket_fd_cb;
   tuya_iot_send_custom_mqtt_msg_cb send_custom_mqtt_msg_cb;
   tuya_iot_send_mqtt_msg_with_topic_cb send_mqtt_msg_with_topic_cb;
   tuya_iot_upload_incre_data_cb upload_incre_data_cb;
   tuya_iot_media_data_report_cb media_data_report_cb;
   tuya_iot_media_data_report_v2_cb media_data_report_v2_cb;
   tuya_iot_get_custom_cfg_cb get_custom_cfg_cb;
   tuya_iot_get_location_info_cb get_location_info_cb;
   tuya_iot_custom_data_report_sync_cb custom_data_report_sync_cb;
   tuya_iot_custom_data_report_async_cb custom_data_report_async_cb;
   tuya_iot_dp_low_power_query_cb dp_low_power_query_cb;
} TUYA_IOT_API_PRE_HANDLE_CBS_S;
</code></pre>
      <pre class="doc-comment"></pre>
    </div>
  </body>
</html>
            